﻿using System;

namespace BankAccountNS
{
    /// <summary> 
    /// Bank Account demo class. https://msdn.microsoft.com/ru-ru/library/ms182532.aspx?tduid=2f42f15223b5a4c737204a2cb7a7a7fe&tduid=2f42f15223b5a4c737204a2cb7a7a7fe#bkmk_prepare_the_walkthrough
    /// </summary> 
    public class BankAccount
    {
        public int[] BubbleSortArray(int[] array)
        {
            for (int j = 0; j <= array.Length - 1; j++)
            {
                for (int i = 0; i < array.Length - 1; i++)
                {
                    int tmp = 0;
                    if (array[i] > array[i + 1])
                    {
                        tmp = array[i];
                        array[i] = array[i + 1];
                        array[i + 1] = tmp;
                    }
                }
            }
            return array;
        }
    }
}